<?php
/**
 * ShopEx licence
 *
 * @copyright  Copyright (c) 2005-2010 ShopEx Technologies Inc. (http://www.shopex.cn)
 * @license  http://ecos.shopex.cn/ ShopEx License
 */

$db['apply_billing']=array (
  'columns' =>
  array (
    'member_id' =>
    array (
      'type' => 'table:members@pam',
      'required' => true,
      'editable' => false,
      'in_list' => true,
      'default_in_list' => true,
      'order' => '4',
      'label' => app::get('aftersales')->_('申请人'),
      'comment' => app::get('aftersales')->_('申请人'),
    ),
    'order_id' =>
    array (
        'type' => 'bigint unsigned',
        'required' => true,
        'default' => 0,
        'pkey' => true,
        'label' => app::get('aftersales')->_('订单号'),
        'is_title' => true,
        'width' => 110,
        'searchtype' => 'has',
        'editable' => false,
        'filtertype' => 'custom',
        'filterdefault' => true,
        'in_list' => true,
        'default_in_list' => true,
    ),
    'billing_id' =>
    array (
      'type' => 'bigint(20)',
      'required' => true,
      'pkey' => true,
      'label' => app::get('aftersales')->_('申请开票记录流水号'),
      'comment' => app::get('aftersales')->_('申请开票记录流水号'),
    ),
    'status' =>
    array (
      'type' =>
      array (
        '1' => app::get('aftersales')->_('审核中'),
        '2' => app::get('aftersales')->_('完成'),
        '3' => app::get('aftersales')->_('拒绝'),
      ),
      'default' => '1',
      'required' => true,
      'label' => app::get('aftersales')->_('申请开票状态'),
      'comment' => app::get('aftersales')->_('申请开票状态'),
    ),
    'billing_money' =>
    array (
      'type' => 'money',
      'default' => '0',
      'required' => true,
      'comment' =>app::get('aftersales')->_('开票金额'),
    ),
    'billing_advance'=>
    array(
      'type'=>'money',
      'default'=>'0',
      'required'=>true,
      'comment'=>app::get('aftersales')->_('可用信用额度'),
    ),
    'bn' => 
    array (
      'type' => 'varchar(200)',
      'editable' => false,
      'comment' => app::get('aftersales')->_('商品明细的名称'),
    ),
     'nums' => 
       array (
      'type' => 'varchar(200)',
      'editable' => false,
      'comment' => app::get('aftersales')->_('订单数'),
    ),
   
    'billing_type'=>
    array (
      'type' =>'varchar(255)',
      'default' => '专用发票',
      'required'=>true,
      'label'=>app::get('aftersales')->_('发票类型'),
      'comment'=>app::get('aftersales')->_('发票类型'),
    ),
    'rise_billing' =>
    array (
        'type' => 'longtext',
        'label' => app::get('aftersales')->_('发票抬头'),
        'comment' => app::get('aftersales')->_('发票抬头'),
    ),
     'company_name' =>
    array (
        'type' => 'longtext',
        'label' => app::get('aftersales')->_('单位名称'),
        'comment' => app::get('aftersales')->_('单位名称'),
    ),
    'company_taxpayer' =>
    array (
        'type' => 'longtext',
        'label' => app::get('aftersales')->_('纳税人识别号'),
        'comment' => app::get('aftersales')->_('纳税人识别号'),
    ),
    'content' =>
    array (
        'type' => 'longtext',
        'label' => app::get('aftersales')->_('发票内容'),
        'comment' => app::get('aftersales')->_('发票内容'),
    ),
    'memo' =>
    array (
        'type' => 'longtext',
        'label' => app::get('aftersales')->_('发票审核留言'),
        'comment' => app::get('aftersales')->_('发票审核留言'),
    ),
      'company_mobile' =>
    array (
        'type' => 'varchar(50)',
        'label' => app::get('aftersales')->_('收票手机号'),
        'width' => 80,
        // 'sdfpath' => 'contact/phone/mobile',
        'searchtype' => 'head',
        'editable' => true,
        'filtertype' => 'normal',
        'filterdefault' => 'true',
        'in_list' => true,
        'default_in_list' => true,
    ),
      'company_email' =>
    array (
        'type' => 'varchar(50)',
        'label' => app::get('aftersales')->_('收票人邮箱'),
        'width' => 80,
        // 'sdfpath' => 'contact/phone/mobile',
        'searchtype' => 'head',
        'editable' => true,
        'filtertype' => 'normal',
        'filterdefault' => 'true',
        'in_list' => true,
        'default_in_list' => true,
    ),
     'company_memo' =>
          array(
              'type' => 'varchar(100)',
              'label' => app::get('aftersales')->_('开票备注'),
              'width' => 80,
              // 'sdfpath' => 'contact/phone/mobile',
              'searchtype' => 'head',
              'editable' => true,
              'filtertype' => 'normal',
              'filterdefault' => 'true',
              'in_list' => true,
              'default_in_list' => true,
          ),
    'last_modify' => array(
      'type' => 'last_modify',
      'label' => app::get('aftersales')->_('更新时间'),
      'comment' => app::get('aftersales')->_('更新时间'),
    ),
  ),
  'engine' => 'innodb',
  'version' => '$Rev: 40912 $',
  'comment' => app::get('aftersales')->_('客户开票申请表'),
);
